package com.example.demo.http;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2020年08⽉27⽇<br/>
 * @version：v1.0.0<br>
 */
@Slf4j
@RestController
@RequestMapping("/demo")
public class ReceiveCallbackReq {


    @ResponseBody
    @PostMapping("/notify")
    public void fddNotify(HttpServletRequest request) {
        String jsonData = request.getParameter("jsonData");
        JSONObject parse = (JSONObject) JSONObject.parse(jsonData);
        log.info("请求参数：{}", parse);
    }
}
